/*
 * Copyright (c) 2024. Lorem ipsum dolor sit amet, consectetur adipiscing elit.
 * Morbi non lorem porttitor neque feugiat blandit. Ut vitae ipsum eget quam lacinia accumsan.
 * Etiam sed turpis ac ipsum condimentum fringilla. Maecenas magna.
 * Proin dapibus sapien vel ante. Aliquam erat volutpat. Pellentesque sagittis ligula eget metus.
 * Vestibulum commodo. Ut rhoncus gravida arcu.
 */

package com.scujj.cs6.service;

import com.scujj.cs6.common.Result;
import com.scujj.cs6.model.vo.FileVo;
import jakarta.servlet.http.HttpServletRequest;
import org.springframework.web.multipart.MultipartFile;

/**
 * 文件服务
 * @author FlanChan
 * @createDate 2024-12-10 16:14:50
 * @version 1.0
 */
public interface FileService {
    /**
     * 上传头像
     *
     * @param multipartFile     文件
     * @param request           HTTP请求
     * @return {@link FileVo}
     */
    Result<FileVo> uploadAvatar(MultipartFile multipartFile, HttpServletRequest request);

    /**
     * 上传头像
     *
     * @param base64Str     base64图片编码
     * @param request           HTTP请求
     * @return {@link FileVo}
     */
    Result<FileVo> uploadAvatar(String base64Str, HttpServletRequest request);
}
